package com.design.common;

import java.util.ArrayList;
import java.util.List;

public class Brocker {
    private List<Order> orders = new ArrayList<Order>();

    public void takeOrder(Order order){
        orders.add(order);
    }

    public void placeOrders(){
        for (Order o: orders) {
            o.execute();
        }

        orders.clear();
    }
}
